/*eoOlaWkWY8h6ycBLK7AzoPHuWsSoeQ30iB7TnkN0ElNA7lL5+Krb5fHWfbaCAZ9p*/
import React, { Component } from 'react';
import constant from '../../constants';
import { afterEvent } from '../events';
import { detailAreaBeforeEvent } from './event';
import ampub from 'ampub';
const { utils } = ampub;
const { multiLangUtils, msgUtils } = utils;
const { showMessage } = msgUtils;
export default class extends Component {
	constructor(props) {
		super(props);
	}

	render() {
		let { createCardTable } = this.props.cardTable;
		let { that } = this.props;
		return (
			<div className="nc-bill-table-area">
				{createCardTable(constant.AREA.STEP.DETAIL_LIST, {
					onAfterEvent: afterEvent.bind(this, that),
					onBeforeEvent: detailAreaBeforeEvent.bind(this),
					showIndex: true,
					hideModelSave: true,
					hideAdd: false,
					adaptionHeight: true,
                    hideDel: false,
					modelDelRowBefore: (props, moduleId, modelIndex, record) => {
                        if (record.values.check_result.value == 1) {
							return true;
						} else {
							showMessage.call(this, props, { color: 'warning', content: '非盘盈资产不能删除！' });
							return false;
						}
					},
				})}
			</div>
		);
	}
}

/*eoOlaWkWY8h6ycBLK7AzoPHuWsSoeQ30iB7TnkN0ElNA7lL5+Krb5fHWfbaCAZ9p*/